1. Field of the Invention.
This invention relates in general to database management systems performed by computers, and in particular, to providing generic code for manipulating data of a structured object.
2. Description of Related Art.
Databases are computerized information storage and retrieval systems. A Relational Database Management System (RDBMS) is a database management system (DBMS) which uses relational techniques for storing and retrieving data. Relational databases are organized into tables which consist of rows and columns of data. The rows are formally called tuples. A database will typically have many tables and each table will typically have multiple tuples and multiple columns. The tables are typically stored on random access storage devices (RASD) such as magnetic or optical disk drives for semi-permanent storage.
RDBMS software using a Structured Query Language (SQL) interface is well known in the art. The SQL interface has evolved into a standard language for RDBMS software and has been adopted as such by both the American National Standards Institute (ANSI) and the International Standards Organization (ISO). The SQL interface allows users to formulate relational operations on the tables either interactively, in batch files, or embedded in host languages, such as C and COBOL. SQL allows the user to manipulate the data.
The definitions for SQL provide that a RDBMS should respond to a particular query with a particular set of data given a specified database content, but the method that the RDBMS uses to actually find the required information in the tables on the disk drives is left up to the RDBMS. Typically, there will be more than one method that can be used by the RDBMS to access the required data. The RDBMS will optimize the method used to find the data requested in a query in order to minimize the computer time used and, therefore, the cost of performing the query.
Traditionally, a RDBMS stored simple data, such as numeric and text data. In a traditional RDBMS, the underlying storage management has been optimized for simple data. More specifically, the size of a record is limited by the size of a data page, which is a fixed number (e.g., 4K) defined by a computer developer. This restriction in turn poses a limitation on the length of columns of a table. To alleviate such a restriction, most computer developers today support a new built-in data type for storing large objects (LOBs) or binary large objects (BLOBs).
Large objects, such as image data, typically have a structure that is not recognized by the RDBMS. Thus, information stored in structured binary large objects (BLOBs), such as images, video, or audio, has traditionally been accessed via application programs. If these BLOBs were stored in a database, then the application developer writes a set of user defined functions (UDFs) that retrieve the information stored in these structured BLOBs or the application developer writes an application that extracts the structured large object (LOB) and then accesses the information. Both of these approaches require the application programmer to write specific code to access the information in the structured BLOB.
There is a need in the art for an improved technique for accessing structured data.
To overcome the limitations in the prior art described above, and to overcome other limitations that will become apparent upon reading and understanding the present specification, the present invention discloses a method, apparatus, and article of manufacture for providing generic code for manipulating data of a structured object stored on a data store connected to a computer.
According to an embodiment of the invention, a structured object stored on a data store connected to a computer is manipulated. Initially, an encoded identifier is received. The encoded identifier is decoded to identify a location within the structured object. When data is to be stored, data is stored at the identified location. When data is to be retrieved, data is retrieved from the identified location.